<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<div class="modal-dialog ms-modal-dialog" style="width: 700px;">
  <div class="modal-content">

    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
      <h4 class="modal-title">评分</h4>
    </div>
       
    <form action="${ctx.host}/appraisal-scorings/${appraisalId}/results/${resultId}/rate" method="POST" data-validate="true" class="form-horizontal ms-form form-personal-info">
    
      <input type="hidden" name="_method" value="PATCH">
      <input type="hidden" name="appraisalId" value="${appraisalId}"/>
            
      <div class="modal-body">
        
        <c:forEach items="${appraisalItemResults}" var="appraisalItemResult">   
          <div class="form-group ms-form-group">
            <label class="control-label col-xs-4 ">${appraisalItemResult.name}（总分${appraisalItemResult.score}）：</label>
            <div class="col-xs-7 pull-left item-result">
              <input type="text" class="form-control" name="results" value="${appraisalResultItem.realScore}" autocomplete="off" data-validate="required|max_decimal_digit,2|max,${appraisalItemResult.score}"/>
              <input type="hidden" name="resultIds" value="${appraisalItemResult.id}"/>
              <input type="hidden" name="itemResults" value=""/>
            </div>
          </div>
        </c:forEach>
        
      </div>
      
      <div class="modal-footer ms-modal-footer">
        <button type="submit" class="btn ms-btn btn-primary">确定</button>
        <button type="button" class="btn ms-btn ms-btn-gary" data-dismiss="modal">取消</button>
      </div>
            
    </form>
       
  </div>
</div>
